package org.lex.ftp.ui.actions;

import java.awt.event.ActionEvent;

import org.lex.ftp.FTP;
import org.lex.ftp.util.bookmark.Site;


public class OpenSiteAction extends FTPAction {
	private Site site = null;

	public OpenSiteAction(FTP app, Site site) {
		super(app);
		this.site = site;
		this.setName(site.getName());
	}

	public void actionPerformed(ActionEvent e) {
		if (app.isConnected())
			app.getFTPExplorer().close();
		app.getFTPExplorer().open(site.getURL());
	}
}
